<div class="tableform"> 
<h4>供应商结算清单</h4>

<div class="division" id="accordion">
		<table width='100%' cellspacing="0" cellpadding="0" class="gridlist">
			<thead>
			<tr>
				<th>供应商</th>
				<th>期初应付</th>
				<th>期初应收</th>
				<th>本期增加应付</th>
				<th>本期增加应收</th>
				<th>本期已付</th>
				<th>本期已收</th>
				<th>期末应付</th>
				<th>期末应收</th>
				<th>差额</th>
			</tr>
			</thead>
			<tbody>
			<{foreach from=$supplier_list name=supplier_list item=item key=key}>
			<tr class="toggler atStart" >
				<td><b><{$item.name}></b></td>
				<td><{$item.initial_pay|cur}></td>
				<td><{$item.initial_receive|cur}></td>
				<td><{$item.pay_add|cur}></td>
				<td><{$item.receive_add|cur}></td>
				<td><{$item.paid|cur}></td>
				<td><{$item.received|cur}></td>
				<td><{$item.final_pay|cur}></td>
				<td><{$item.final_receive|cur}></td>
				<td><{$item.difference|cur}></td>
			</tr>
			</tbody>
			<tr  >
			<td colspan="10" >
				<div class="element atStart">
				<h4>明细</h4>
				<div class="division">
				<table  cellspacing="0" cellpadding="0" style="background-color:#F7FBFF;">
				<tbody>
					<tr>
						<th>单据号</th>
						<th>业务类型</th>
						<th>期初应付</th>
						<th>期初应收</th>
						<th>本期增加应付</th>
						<th>本期增加应收</th>
						<th>本期已付</th>
						<th>本期已收</th>
						<th>期末应付</th>
						<th>期末应收</th>
						<th>差额</th>
					</tr>
						<{foreach from=$item.statement_list item=sub_item key=sub_key}>
							<tr>
							   <td><{$sub_item.object_bn|default:"-"}></td>
							   <td><{$statement_type[$sub_item.object_type]}></td>
							   <td><{$sub_item.initial_pay|cur}></td>
							   <td><{$sub_item.initial_receive|cur}></td>
							   <td><{$sub_item.pay_add|cur}></td>
							   <td><{$sub_item.receive_add|cur}></td>
							   <td><{$sub_item.paid|cur}></td>
							   <td><{$sub_item.received|cur}></td>
							   <td><{$sub_item.final_pay|cur}></td>
							   <td><{$sub_item.final_receive|cur}></td>
							   <td>
							   <{if $sub_item.object_type==3}>
							   <font color="red">
							   <{if $sub_item.difference>'0'}>
							   -
							   <{/if}>
							   <{$sub_item.difference|cur}></font>
							   <{else}>
							   <{$sub_item.difference|cur}>
							   <{/if}>
							   </td>
							</tr>
						<{/foreach}>
				</tbody>
				</table>
				</div>
				</div>
			</td>
			</tr>
			<{/foreach}>
			
			<tr align="center" height="30">
                <th colspan="10"></th>
            </tr>
		</table>
   </div>

   </div>